home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utmisc1 / chktex.lha / chktex / ChkTeX.install < prev    next >
Text File  |  1996-04-30  |  12KB  |  479 lines

  1. ;
  2. ;  ChkTeX.install v1.4, installs the ChkTeX program
  3. ;  Copyright (C) 1995-96 Jens T. Berger Thielemann
  4. ;
  5. ;  This program is free software; you can redistribute it and/or modify
  6. ;  it under the terms of the GNU General Public License as published by
  7. ;  the Free Software Foundation; either version 2 of the License, or
  8. ;  (at your option) any later version.
  9. ;
  10. ;  This program is distributed in the hope that it will be useful,
  11. ;  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. ;  GNU General Public License for more details.
  14. ;
  15. ;  You should have received a copy of the GNU General Public License
  16. ;  along with this program; if not, write to the Free Software
  17. ;  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. ;
  19. ;  Contact the author at:
  20. ;      Jens Berger
  21. ;      Spektrumvn. 4
  22. ;      N-0666 Oslo
  23. ;      Norway
  24. ;      E-mail: <jensthi@ifi.uio.no>
  25. ;
  26. ;
  27. ;
  28.  
  29.  
  30. (procedure
  31.     nop
  32.     (set foo "foo")
  33. )
  34.  
  35.  
  36. (procedure
  37.     CreateDir
  38.     (if
  39.         (select
  40.             (exists
  41.                 Directory
  42.                 (noreq)
  43.             )
  44.  
  45. ; Does not exist
  46.             (makedir Directory)
  47. ; File
  48.             (
  49.                 (rename
  50.                     Directory
  51.                     (cat
  52.                         Directory
  53.                         ".bak"
  54.                     )
  55.                 )
  56.                 (makedir Directory)
  57.             )
  58. ; Directory. What's the name of the _real_ NOP?
  59.             (nop)
  60.         )
  61.     )
  62. )
  63.  
  64.  
  65.  
  66.  
  67.  
  68. (set @app-name "ChkTeX")
  69.  
  70. (welcome)
  71.  
  72. (message
  73.     "Welcome to the ChkTeX installation script.\n"
  74.     "Before taking the program in use, please read the COPYING file; "
  75.     "it applies to this script as well as the remaining parts of the "
  76.     "package. In short:\nNO WARRANTIES WHATSOEVER.\n\n"
  77.     "Copyright © 1995-96\nJens T. Berger Thielemann\n<jensthi@ifi.uio.no>"
  78. )
  79.  
  80. (set
  81.     @default-dest
  82.     (askdir
  83.         (prompt "Where do you wish ChkTeX installed?")
  84.         (default "C:")
  85.         (help
  86.             "  You can here select where you wish to install the "
  87.             "main ChkTeX executable program.\n\n"
  88.             @askdir-help
  89.         )
  90.     )
  91. )
  92.  
  93. (copyfiles
  94.     (source "ChkTeX")
  95.     (dest @default-dest)
  96.     (infos)
  97. )
  98.  
  99. ;;;;;;
  100. ;;
  101. ;; Install environment file
  102. ;;
  103. ;;;;;;
  104.  
  105. (if
  106.     (exists
  107.         "ENV:CHKTEXRC"
  108.         (noreq)
  109.     )
  110.     (
  111.         (set
  112.             ConfigPath
  113.             (getenv "CHKTEXRC")
  114.         )
  115.         (set EnvPath 1)
  116.     )
  117.     (
  118.         (if
  119.             (exists
  120.                 "ENVARC:"
  121.                 (noreq)
  122.             )
  123.             (set ConfigPath "ENVARC:")
  124.             (set ConfigPath "S:")
  125.         )
  126.         (set EnvPath 0)
  127.     )
  128. )
  129.  
  130. (if
  131.     (or
  132.         (= @user-level 2)
  133.         (exists
  134.             (tackon ConfigPath ".chktexrc")
  135.         )
  136.     )
  137.     (set
  138.         install
  139.         (askbool
  140.             (prompt "Install environment files?")
  141.             (help
  142.                 "  If you select `yes', the default environment files will "
  143.                 "be installed. They will initialize ChkTeX to a `normal' "
  144.                 "behaviour, and give a good starting-point for "
  145.                 "modification.\n"
  146.                 "  However, if you've already installed an earlier version of "
  147.                 "ChkTeX, and modified the .chktexrc file, you will probably not "
  148.                 "want to overwrite that one. You should still take a "
  149.                 "look at the included .chktexrc, though, to be introduced to the new "
  150.                 "keywords that are introduced."
  151.             )
  152.             (default 1)
  153.         )
  154.     )
  155.     (set install 1)
  156. )
  157.  
  158. (if
  159.     (= install 1)
  160.     (
  161.         (if
  162.             (exists "chktexrc")
  163.             (rename "chktexrc" ".chktexrc")
  164.         )
  165.  
  166.         (if
  167.             (or
  168.                 (<> ConfigPath "S:")
  169.                 (<> EnvPath 0)
  170.             )
  171.             (if
  172.                 (askbool
  173.                     (prompt "Where should the resource file be installed?")
  174.                     (help
  175.                         "The resource file has grown quite big (15k). "
  176.                         "Therefore, low memory systems may not wish to have it "
  177.                         "permanently stored in RAM. ChkTeX supports putting it "
  178.                         "in a custom location; if you wish to do this, select "
  179.                         "\"User dir\", else \"Environment\"."
  180.                     )
  181.                     (choices "User dir" "Environment")
  182.                     (default EnvPath)
  183.                 )
  184.                 (
  185.                     (set
  186.                         ConfigPath
  187.                         (askdir
  188.                             (prompt "Select path for resource file.")
  189.                             (help
  190.                                 "Please select a permanent location for "
  191.                                 "the .chktexrc file. We will store the "
  192.                                 "path to it in an environment variable "
  193.                                 "named CHKTEXRC."
  194.                             )
  195.                             (default ConfigPath)
  196.                         )
  197.                     )
  198.                     (set
  199.                         SetEnvCmd
  200.                         (cat
  201.                             "SetEnv CHKTEXRC "
  202.                             (expandpath ConfigPath)
  203.                             "\n"
  204.                         )
  205.                     )
  206.  
  207.                     (startup
  208.                         @app-name
  209.                         (prompt "Add lines to S:User-startup?")
  210.                         (help
  211.                             "ChkTeX needs to modify S:User-startup in "
  212.                             "to refind the .chktexrc file. This will be "
  213.                             "done in this step.\n"
  214.                             @startup-help
  215.                         )
  216.                         (command SetEnvCmd)
  217.                     )
  218.                     (textfile
  219.                         (dest "ENV:CHKTEXRC")
  220.                         (append (expandpath ConfigPath))
  221.                     )
  222.                 )
  223.             )
  224.         )
  225.  
  226.         (copyfiles
  227.             (source ".chktexrc")
  228.             (dest ConfigPath)
  229.         )
  230.  
  231.         (if
  232.             (=
  233.                 ConfigPath
  234.                 "ENVARC:"
  235.             )
  236.             (copyfiles
  237.                 (source ".chktexrc")
  238.                 (dest "ENV:")
  239.             )
  240.         )
  241.     )
  242. )
  243.  
  244. (if
  245.     (exists
  246.         "HELP:"
  247.         (noreq)
  248.     )
  249.     (set
  250.         docdest
  251.         "HELP:"
  252.     )
  253.     (set
  254.         docdest
  255.         @default-dest
  256.     )
  257. )
  258.  
  259.  
  260. (copyfiles
  261.     (source "")
  262.     (dest docdest)
  263.     (choices
  264.         "COPYING"
  265.         "ChkTeX.readme"
  266.         "ChkTeX.tex"
  267.         "ChkTeX.dvi"
  268.         "ChkTeX.ps"
  269.     )
  270.     (prompt "Which documentation files do you wish to install?")
  271.     (help
  272.         "  If you would like to have the documentation online, you have "
  273.         "the possibility here. It might be nice for future reference.\n"
  274.         "  As you may know, the .dvi file is in the Device Independent "
  275.         "format; the .ps file is in PostScript. Please select those "
  276.         "fitting your decoding software.\n"
  277.         "  The remaining files are plain iso-8859-1 encoded text files.\n\n"
  278.         @copyfiles-help
  279.     )
  280.     (confirm)
  281.     (infos)
  282. )
  283.  
  284. (if
  285.     (or
  286.         (exists
  287.             "REXX:"
  288.             (noreq)
  289.         )
  290.         (=
  291.             @user-level
  292.             2
  293.         )
  294.     )
  295.     (copyfiles
  296.         (source "")
  297.         (dest "REXX:")
  298.         (choices
  299.             "ChkTeX.rexx"
  300.             "ChkTeX.ced"
  301.             "ChkTeX.ged"
  302.         )
  303.         (prompt "Which parts of the SCMSG/ARexx interface should be installed?")
  304.         (help
  305.             "  If you've got SCMSG (included in the SAS/C package) and "
  306.             "ARexx installed, these scripts will make the use much more "
  307.             "comfortable.\n"
  308.             "  To use any of these, you must install the `ChkTeX.rexx' "
  309.             "script.\n"
  310.             "  In addition, you may wish to install `ChkTeX.ced' or `ChkTeX.ged' "
  311.             "if you are using respectively CygnusED or GoldED to "
  312.             "edit your LaTeX files.\n"
  313.             "  These interfaces may of course be improved even more, "
  314.             "by making the editor's screen public, and installing the "
  315.             "programs on a hotkey.\n\n"
  316.             @copyfiles-help
  317.         )
  318.         (confirm)
  319.         (infos)
  320.     )
  321. )
  322.  
  323. (if
  324.     (askbool
  325.         (prompt "Install CWEB filters?")
  326.         (help
  327.             "  These programs will filter away everything of a CWEB "
  328.             "document but the LaTeX code. They will preserve line numbers.\n"
  329.             "  However, the scripts requires that you have Perl v5 installed; "
  330.             "you also need C-shell or an equivalent shell to make use of "
  331.             "them.\n"
  332.         )
  333.         (default 0)
  334.     )
  335.     (
  336.         (set
  337.             cwebdest
  338.             (askdir
  339.                 (prompt "Where do you wish the CWEB filters installed?")
  340.                 (default "USR:perl")
  341.                 (help
  342.                     "  You can here select where you wish to install the "
  343.                     "C-shell and Perl CWEB filters.\n\n"
  344.                     @askdir-help
  345.                 )
  346.             )
  347.         )
  348.         (copyfiles
  349.             (source "")
  350.             (dest cwebdest)
  351.             (choices
  352.                 "deweb.in"
  353.                 "chkweb.in"
  354.             )
  355.         )
  356.  
  357.         (rename
  358.             (tackon
  359.                 cwebdest
  360.                 "deweb.in"
  361.             )
  362.             (tackon
  363.                 cwebdest
  364.                 "deweb"
  365.             )
  366.         )
  367.         (rename
  368.             (tackon
  369.                 cwebdest
  370.                 "chkweb.in"
  371.             )
  372.             (tackon
  373.                 cwebdest
  374.                 "chkweb"
  375.             )
  376.         )
  377.     )
  378. )
  379.  
  380. (if
  381.     (askbool
  382.         (prompt "Install ChkTeX C-source files?")
  383.         (help
  384.             "  If you select `yes', the source code files of the "
  385.             "project will be installed in a directory of your selection. "
  386.             "This may be handy for future reference, or if you wish to "
  387.             "hack a bit on ChkTeX for yourself. Please read the COPYING "
  388.             "file before doing so, however."
  389.         )
  390.         (default 0)
  391.     )
  392.     (
  393.         (set
  394.             sourcedest
  395.             (askdir
  396.                 (prompt "Where do you want the source installed?")
  397.                 (default "sc:source/")
  398.                 (help
  399.                     "  You can here select where you wish to install the "
  400.                     "C source of the main ChkTeX executable program. "
  401.                     "A directory will be created there named ChkTeX.\n\n"
  402.                     @askdir-help
  403.                 )
  404.             )
  405.         )
  406.         (set
  407.             sourcedest
  408.             (tackon
  409.                 sourcedest
  410.                 "ChkTeX"
  411.             )
  412.         )
  413.  
  414.         (set
  415.             Directory
  416.             sourcedest
  417.         )
  418.         (CreateDir)
  419.  
  420.         (copyfiles
  421.             (source "")
  422.             (dest sourcedest)
  423.             (choices
  424.                 "ChkTeX.c"
  425.                 "ChkTeX.h"
  426.                 "FindErrs.c"
  427.                 "getopt.c"
  428.                 "getopt.h"
  429.                 "getopt1.c"
  430.                 "OpSys.c"
  431.                 "Resource.c"
  432.                 "Utility.c"
  433.                 "WB2Argv.c"
  434.                 "WB2Argv.h"
  435.                 "WB2Argv.readme"
  436.  
  437.                 "config.h.AMIGA"
  438.                 "config.h.in"
  439.                 "configure.in"
  440.  
  441.                 "Makefile.in"
  442.                 "smakefile"
  443.  
  444.                 "Test.tex"
  445.                 "input.tex"
  446.                 "SCOPTIONS"
  447.             )
  448.             (infos)
  449.         )
  450.  
  451.         (set
  452.             execsourcedest
  453.             (tackon
  454.                 sourcedest
  455.                 "exec"
  456.             )
  457.         )
  458.  
  459.         (set
  460.             Directory
  461.             execsourcedest
  462.         )
  463.         (CreateDir)
  464.         
  465.         (copyfiles
  466.             (source "exec/types.h")
  467.             (dest execsourcedest)
  468.         )
  469.     )
  470. )
  471.  
  472.  
  473. (exit
  474.     "To enhance the program's function, please take a look at "
  475.     "the .chktexrc file, located in the "
  476.     "`" ConfigPath "' directory.\n\n"
  477.     "Have fun.\n\n"
  478. )
  479.